package com.controller;

import com.entity.City;
import com.service.LayCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
public class LayCityController {
    @Autowired
    private LayCityService layCityService;
    @RequestMapping("/selectAllLay")
    @ResponseBody
    public Map selectAllLay(Integer page,Integer limit,String cityName){
        return layCityService.selectAllLay(page,limit,cityName);
    }
    @RequestMapping("/insert")
    @ResponseBody
    public Map insert(City city){
        return layCityService.insert(city);
    }
}
